import 'package:dartz/dartz.dart';

extension EitherX<L, R> on Either<L, R> {
  R asRight() {
    return fold(
      (l) => throw UnimplementedError(),
      (r) => r,
    );
  }

  L asLeft() {
    return fold(
      (l) => l,
      (r) => throw UnimplementedError(),
    );
  }
}
